/**O_APPEND*/
#include<errno.h>
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>

int main(int argc,char **argv){
	int fd,ret;
	fd=open("test.txt",O_WRONLY|O_APPEND);
	for(int i=0;i<argc;i++){
		write(fd,argv[i],sizeof(argv[i]));
		write(fd," ",1);
	}
	write(fd,"\n",1);
	close(fd);
	return 0;
}
